/*
 * $Id: StatusReport.java,v 1.2 2009/05/01 14:33:34 afaichun Exp $
 * 
 * Copyright (C) 2008 General Electric Company. All Rights Reserved.
 * 
 * This software is the confidential and proprietary information of the General
 * Electric Company (GE). You shall not disclose this software and shall use it
 * only in accordance with the terms of the license agreement you entered into
 * with GE.
 * 
 * GE MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE
 * SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
 * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR
 * NON-INFRINGEMENT. GE SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE
 * AS A RESULT OF USING, MODIFYING, OR DISTRIBUTING THIS SOFTWARE OR ITS
 * DERIVATIVES.
 */
package com.ge.healthcare.autosc.onwatch.xml.tag;


public class StatusReport {

	private TaskListTag taskListTag = null;
	
	public StatusReport() {}
	
	public void setTaskList(TaskListTag taskListTag) {
		this.taskListTag = taskListTag;
	}
	
	public TaskListTag getTaskList() {
		return taskListTag;
	}
	
	public boolean isTaskListFailed() {
		boolean failed = true;
		if(taskListTag != null) {
			failed = taskListTag.isFailed();
		}
		return failed;
	}
	
	public String toString() {
		StringBuffer msg = new StringBuffer();
		msg.append(StatusReport.class.getName()).append(":\n");
		if(taskListTag != null) {
			msg.append(taskListTag);
		}
		msg.append("\n");
		return msg.toString();
	}
}
